<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class admin_view_company extends Page
{
       public $Image2 = null;
       public $lblContactNo = null;
       public $lblContactPerson = null;
       public $lblBusinessType = null;
       public $lblPhone = null;
       public $lblAreaCode = null;
       public $lblAddress = null;
       public $lblEmail = null;
       public $Label7 = null;
       public $Label6 = null;
       public $Label5 = null;
       public $Label4 = null;
       public $Label3 = null;
       public $Label2 = null;
       public $Label1 = null;
       public $lblCompanyName = null;
       function admin_view_companyCreate($sender, $params)
       {
        $company_id = $_GET['company_id'];
        $query_comp = "SELECT * FROM company_tbl WHERE company_id='".$company_id."'";
        $result_comp = mysql_query($query_comp) or die("SELECT COMPANY ".mysql_error());
        $row_comp = mysql_fetch_array($result_comp);

        $this->lblCompanyName->setCaption($row_comp['company_name']);
        $this->lblEmail->setCaption($row_comp['general_email']);
        $this->lblAddress->setCaption($row_comp['address']);
        $this->lblAreaCode->setCaption($row_comp['acode']);
        $this->lblPhone->setCaption($row_comp['comp_phone']);
        $this->lblBusinessType->setCaption($row_comp['business_type']);
        $this->lblContactPerson->setCaption($row_comp['contact_person']);
        $this->lblContactNo->setCaption($row_comp['contact_person_num']);
       }

}

global $application;

global $admin_view_company;

//Creates the form
$admin_view_company=new admin_view_company($application);

//Read from resource file
$admin_view_company->loadResource(__FILE__);

//Shows the form
$admin_view_company->show();

?>